package a.f.g.a;

import a.c.w;

public class yb
  implements nc, bc
{
  private double b = 0.5D;
  private double c = 50.0D;
  private double d;
  private double e;
  private double f;
  private double g;
  private double h = this.f + this.d / 2.0D;
  private double i = this.g + this.e / 2.0D;
  public static int j;
  
  public void a(double paramDouble1, double paramDouble2, double paramDouble3, double paramDouble4)
  {
    this.f = paramDouble1;
    this.g = paramDouble2;
    this.d = paramDouble3;
    this.e = paramDouble4;
    this.h = (this.f + this.d / 2.0D);
    this.i = (this.g + this.e / 2.0D);
  }
  
  public double a()
  {
    return this.c;
  }
  
  public void a(double paramDouble)
  {
    this.c = paramDouble;
  }
  
  public double b()
  {
    return this.b;
  }
  
  public void b(double paramDouble)
  {
    this.b = paramDouble;
  }
  
  public double c()
  {
    return this.e;
  }
  
  public void c(double paramDouble)
  {
    this.e = paramDouble;
    this.i = ((this.g + paramDouble) / 2.0D);
  }
  
  public double d()
  {
    return this.d;
  }
  
  public void d(double paramDouble)
  {
    this.d = paramDouble;
    this.h = (this.f + paramDouble / 2.0D);
  }
  
  public double e()
  {
    return this.f;
  }
  
  public void e(double paramDouble)
  {
    this.f = paramDouble;
    this.h = (paramDouble + this.d / 2.0D);
  }
  
  public double f()
  {
    return this.g;
  }
  
  public void f(double paramDouble)
  {
    this.g = paramDouble;
    this.i = ((paramDouble + this.e) / 2.0D);
  }
  
  public yb() {}
  
  public yb(double paramDouble1, double paramDouble2, double paramDouble3, double paramDouble4, double paramDouble5)
  {
    a(paramDouble1, paramDouble2, paramDouble3, paramDouble4);
    this.c = paramDouble5;
  }
  
  public y a(cb paramcb, bb parambb, f paramf)
  {
    boolean bool = xb.r;
    int k = xb.q;
    if ((bool) || ((this.d <= 0.0D) || (this.e <= 0.0D))) {
      return paramf;
    }
    y localy = paramcb.a();
    double d1 = (this.d - 2.0D * this.c) / 2.0D;
    double d2 = (this.e - 2.0D * this.c) / 2.0D;
    double d3 = this.h - localy.d();
    double d4 = this.i - localy.f();
    if (!bool) {
      if (-d3 > d1)
      {
        if (bool) {
          break label179;
        }
        if (-d4 > d2)
        {
          a(localy.d() - (this.h + d1), localy.f() - (this.i + d2), paramf);
          return paramf;
        }
      }
    }
    label179:
    if (!bool) {
      if (d3 > d1)
      {
        if (bool) {
          break label257;
        }
        if (-d4 > d2)
        {
          a(-localy.d() + (this.h - d1), localy.f() - (this.i + d2), paramf);
          paramf.b(-paramf.d());
          return paramf;
        }
      }
    }
    label257:
    if (!bool) {
      if (d3 > d1)
      {
        if (bool) {
          break label349;
        }
        if (d4 > d2)
        {
          a(-localy.d() + (this.h - d1), -localy.f() + (this.i - d2), paramf);
          paramf.b(-paramf.d());
          paramf.d(-paramf.f());
          return paramf;
        }
      }
    }
    label349:
    if (!bool) {
      if (-d3 > d1)
      {
        if (bool) {
          break label425;
        }
        if (d4 > d2)
        {
          a(localy.d() - (this.h + d1), -localy.f() + (this.i - d2), paramf);
          paramf.d(-paramf.f());
          return paramf;
        }
      }
    }
    label425:
    if (!bool) {
      if (d3 > 0.0D)
      {
        if (!bool)
        {
          if (d3 > d1)
          {
            paramf.b((d3 - d1) / this.c);
            return paramf;
          }
          paramf.b(0.0D);
        }
        if (bool) {
          break label519;
        }
        if (k == 0) {
          break label515;
        }
      }
    }
    if (-d3 > d1)
    {
      paramf.b((d3 + d1) / this.c);
      return paramf;
    }
    paramf.b(0.0D);
    label515:
    label519:
    if (!bool) {
      if (d4 > 0.0D)
      {
        if (!bool)
        {
          if (d4 > d2)
          {
            paramf.d((d4 - d2) / this.c);
            return paramf;
          }
          if (bool) {
            break label610;
          }
          paramf.d(0.0D);
        }
        if (k == 0) {
          return paramf;
        }
      }
    }
    if (-d4 > d2)
    {
      paramf.d((d4 + d2) / this.c);
      return paramf;
    }
    paramf.d(0.0D);
    label610:
    return paramf;
  }
  
  private void a(double paramDouble1, double paramDouble2, f paramf)
  {
    boolean bool = xb.r;
    int k = xb.q;
    double d1 = 0.0D;
    double d2 = 0.0D;
    double d3 = this.c * this.b;
    if (!bool) {
      if (paramDouble1 - d3 >= paramDouble2)
      {
        d1 = -paramDouble1 / this.c;
        if (bool) {
          return;
        }
        if (k == 0) {
          break label237;
        }
      }
    }
    if (!bool)
    {
      if (paramDouble2 - d3 >= paramDouble1)
      {
        d2 = -paramDouble2 / this.c;
        if (bool) {
          return;
        }
        if (k == 0) {
          break label237;
        }
      }
      if (bool) {}
    }
    else if (paramDouble1 < d3)
    {
      if (bool) {
        break label182;
      }
      if (paramDouble2 < d3)
      {
        if (bool) {
          break label182;
        }
        if (Math.sqrt(paramDouble1 * paramDouble1 + paramDouble2 * paramDouble2) <= d3)
        {
          d1 = -paramDouble1 / this.c;
          d2 = -paramDouble2 / this.c;
          if (bool) {
            return;
          }
          if (k == 0) {
            break label237;
          }
        }
      }
    }
    label182:
    double d4 = Math.sqrt(d3 * d3 - (paramDouble1 - paramDouble2) * (paramDouble1 - paramDouble2) / 2.0D);
    double d5 = (paramDouble1 + paramDouble2) / 2.0D - d4 * 0.7071067811865476D;
    double d6 = (d5 + d3) / (this.c * d3);
    d1 = (d5 - paramDouble1) * d6;
    d2 = (d5 - paramDouble2) * d6;
    label237:
    paramf.b(d1);
    paramf.d(d2);
  }
  
  public void a(bb parambb, xb paramxb)
  {
    int k = xb.q;
    double d1 = this.h - paramxb.b();
    double d2 = this.i - paramxb.c();
    w localw = paramxb.m().v();
    do
    {
      if (!localw.e()) {
        break;
      }
      xb.a_ locala_ = paramxb.d(localw.d());
      locala_.a(locala_.b() + d1);
      locala_.c(locala_.c() + d2);
      localw.f();
    } while (k == 0);
  }
}



/* Location:           E:\idea\

 * Qualified Name:     a.f.g.a.yb

 * JD-Core Version:    0.7.0.1

 */